<template>
	<view class="news-wrap">
		<template v-if="content">
			<view class="news-title">{{title}}</view>
			<view class="news-sub" v-if="author">作者：{{author}}</view>
	
			<u-parse :content="content"></u-parse>
		</template>
		<mix-empty v-else :type="'default'" :backgroundColor="'#fff'"></mix-empty>
		<tui-modal></tui-modal>
	</view>
</template>

<script>
	import uParse from '@/components/gaoyia-parse/parse.vue'
	import mixEmpty from '@/components/mix-empty/mix-empty.vue';
	
	export default {
		components: {
			uParse,
			mixEmpty,
		},
		data() {
			return {
				srcUrl:'',
				content: '',
				title:'',
				author:'',
				html:''
			}
		},
		onLoad(option){
			// #ifdef H5
			   this.$wechat.noShare();
			// #endif
			let item = JSON.parse(decodeURIComponent(option.item));
			console.log(item)
			this.title= item.title;
			this.author= item.author;
			this.content = item.content;
		},
		methods: {
		}
	}
</script>

<style scoped lang="scss">
.news-wrap{
	width: 100%;
	height: 100vh;
	padding:30rpx;
	padding-bottom: constant(safe-area-inset-bottom);
	padding-bottom: env(safe-area-inset-bottom);
	box-sizing: border-box;
	background-color: #fff;
	border-top:2rpx solid $borderColor;
	.news-title{
		font-size: 32rpx;
		line-height: 50rpx;
		margin-bottom: 20rpx;
	}
	.news-sub{
		font-size: 28rpx;
		margin-bottom: 20rpx;
		color:#999;
	}
}
.news-box{
	width:100%;
	height:480rpx;
	margin-bottom: 20rpx;
	image{
		width: 100%;
	}
}
</style>
